<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="javascript" src="webjars/jquery/3.6.0/src/jquery.js"></script>
</head>
<body>
<form action="/user/register" method="get">
    <p>
        <input type="text" name="username" placeholder="用户名" id="name" onblur="validateName()">
    </p>
    <p>
        <input type="password" name="password" placeholder="密码">
    </p>
    <p>
        <input type="email" name="email" placeholder="请输入邮箱">
    </p>
    <p>
        <input type="text" name="age" placeholder="年龄">
    </p>
    <p>
        <input type="date" name="birthday" placeholder="出生日期">
    </p>

    <p>
        男 <input type="radio" name="sex" value="man">
        女 <input type="radio" name="sex" value="female">
    </p>
    <p>兴趣</p>
    <p>
        足球<input type="checkbox" name="habit" value="soccer">
        篮球<input type="checkbox" name="habit" value="basketball">
        乒乓球<input type="checkbox" name="habit" value="pingpang">
    </p>
    <p>
        <input type="submit" value="提交">
    </p>
</form>
</body>
<script>
    /*前端利用js、jquery、bootstrap、vue完成前端校验*/
    function validateName(){
        let name = $("#name").val();
    //    ........
    }

</script>
</html>